package pl.pasu.mydiet.shared;

public class Logger {
	private static final int LOG_NONE = 0;
	private static final int LOG_ERROR = 1;
	private static final int LOG_DEBUG = 2;
	private static final int LOG_WARN = 3;
	private static final int LOG_INFO = 4;
	private static final int LOG_ALL = 5;

	private static final int LOG_LEVEL = LOG_ALL;

	public static void d(String logTag, String message) {
		if (LOG_LEVEL >= LOG_DEBUG) {
			System.out.println("[" + logTag + "] " + message);
		}
	}

	public static void i(String logTag, String message) {
		if (LOG_LEVEL >= LOG_INFO) {
			System.out.println("[" + logTag + "] " + message);
		}
	}

	public static void w(String logTag, String message) {
		if (LOG_LEVEL >= LOG_WARN) {
			System.out.println("[" + logTag + "] " + message);
		}
	}

	public static void e(String logTag, String message) {
		if (LOG_LEVEL >= LOG_ERROR) {
			System.err.println("[" + logTag + "] " + message);
		}
	}
}
